<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/lib/jquery-easyui-1.4.2/themes/default/easyui.css">  
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/lib/jquery-easyui-1.4.2/themes/icon.css">   
<script type="text/javascript" src="${pageContext.request.contextPath}/js/lib/jquery-easyui-1.4.2/jquery.min.js"></script>   
<script type="text/javascript" src="${pageContext.request.contextPath}/js/lib/jquery-easyui-1.4.2/jquery.easyui.min.js"></script> 

<!-- 扩展jQuery -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/lib/extJquery.js?v=201305301341" charset="utf-8"></script>
<!-- 引用nsltools -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/util/nsltools.js" charset="utf-8"></script>
<!-- utility_nsl -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/myUtility/utility_nsl.js" charset="utf-8"></script>

<script type="text/javascript">
	$(document).ready(function() {
		var str_urlOfContractPhotoList=contextPath+'/photo/project/contractPhotoList.json';
		var obj_postData={
						  'projectId':1
						 };
		$.ajax({  
	    url:str_urlOfContractPhotoList,// 跳转到 action  
	    data:obj_postData,  
	    type:'post',  
	    cache:false,  
	    dataType:'json',  
	    beforeSend:function(XMLHttpRequest ){
	    	console.log("in beforeSend");
	    	$.messager.progress({
				title : '提示',
				text : '正在加载数据~'
			});
	    },
	    success:function(json) {
	    	console.log(json);
	    	if(json.success){
	    		console.log(json);
	    		var array_contractPhoto=json.data;
	    		$.each(array_contractPhoto,function(){
	    			var obj_contractPhoto=this;
	    			var str_imgSrc=contextPath+'/resource/photo/contractPhoto/'+obj_contractPhoto.fileName;
	    			var str_img="<img src='"+str_imgSrc+"'>";
	    			var jq_img=$(str_img);
	    			$('#wrapper').append(jq_img);
	    		});
	    	}else{
	    		alert("加载数据失败.");
	    	}
	    	$.messager.progress('close');
	    },
	    error:function(){
	    	$.messager.progress('close');
	    }
	 });
	});
	
</script>

</head>

<body>
	<div id='wrapper'>
	</div>
</body>
</html>